/**
 * 
 */
package com.gragra.nounIdentification;
/**
 * implements the convergence assessment based simply on comparing the number of iterations already done
 * to some maximum number of iterations to be done
 * @author Christoph Teichmann
 * created Mar 26, 2013 10:23:40 AM
 * @version 0.1
 */
public class ConvergenceByIterations implements ConvergenceAssessment
{
	/**
	 * creates a new instance with the given maximum number of iterations to be used
	 * @param max
	 */
	public ConvergenceByIterations(int max)
	{this.max = max;}
	/**
	 * the maximum iterations to be used
	 */
	private final int max;
	/* (non-Javadoc)
	 * @see com.gragra.nounIdentification.ConvergenceAssessment#hasConverged(int, com.gragra.nounIdentification.NounIdentifier)
	 */
	@Override
	public boolean hasConverged(int iterations, NounIdentifier nounIdentifier)
	{return iterations >= max;}
}